@ECHO OFF
REM -- Usage: Make <target>...
REM -- E.g.:  Make deb
REM --
REM -- Each <target> may be:
REM --   all		Build everything (default)
REM --   deb		Build debug version
REM --   rel		Build release version
REM --   ide		Open this solution in Visual Studio
REM --   clean		Delete built files
REM --   cleanall	Delete built files and IDE temporary files
REM --
IF "%1"=="" Make.bat all
:loop
IF "%1"=="" EXIT /B 0
ECHO [%1]
GOTO %1

:all
CALL Make.bat deb rel
GOTO next

:deb
CALL ..\..\Misc\VsBuild AquosSimulator.sln Debug bin\Debug\AquosSimulator.dll
GOTO next

:rel
CALL ..\..\Misc\VsBuild AquosSimulator.sln Release bin\Release\AquosSimulator.dll
GOTO next

:ide
start AquosSimulator.sln
GOTO next

:clean
rmdir /s /q bin 2> nul
rmdir /s /q obj 2> nul
GOTO next

:cleanall
CALL Make.bat clean
del AquosSimulator.csproj.user 2> nul
attrib -h -r AquosSimulator.v11.suo > nul
del AquosSimulator.v11.suo 2> nul
GOTO next

:doc
REM -- not implemented
GOTO next

EXIT /B 0

:next
IF ERRORLEVEL 1 EXIT /B %ERRORLEVEL%
SHIFT
GOTO loop

